@isTest
public class TestTaskCreateController{
    
    //Test Method
    public static testMethod void TestTaskCreateController(){  
    
    Profile Profile1 = [select id from profile where name='System Administrator'];
    User User1 =  [Select id, isActive from User where profileId =:Profile1.id and isActive=true Limit 1];
    
    System.debug('# User1:'+User1);
    
    Account a = new Account();
        a.RecordTypeId=[Select id from RecordType where SobjectType='Account' AND Name='Person Account'].Id;
        a.FirstName=' ';
        a.LastName='Brduser Test';
        a.Mobile_Phone__c='2342342';
        insert a;
        
    PageReference Taskcreatepage = Page.Taskcreatepage ;
        Taskcreatepage.getParameters().put('AccountId',a.id);   
        test.setCurrentPage(Taskcreatepage);
    
    TaskCreateController nTask = new TaskCreateController();
        nTask.initmethod();
        nTask.newtask=new Task();
        nTask.accountId=(String)a.Id;
        nTask.newtask.Query_Type__c='Payment Related';
        nTask.getDescribesubjectpiclist();
        nTask.onchange();
        nTask.Ispaymentrelated=true;
        nTask.Createtask();
        
        insert nTask.newtask;
        
    TaskCreateController nTask11 = new TaskCreateController();
        nTask11.initmethod();
        nTask11.newtask=new Task();
        nTask11.accountId=(String)a.Id;
        nTask11.newtask.Query_Sub_Type_Payment_Related__c='Interest related';
        nTask11.newtask.Payment_Related_Comment__c='test comment';
        nTask11.getDescribesubjectpiclist();
        nTask11.OnchangePaymentRelated();
        
        insert nTask11.newtask;
        
    TaskCreateController nTask12 = new TaskCreateController();
        nTask12.initmethod();
        nTask12.newtask=new Task();
        nTask12.accountId=(String)a.Id;
        nTask12.newtask.Query_Sub_Type_Cancellation_Related__c='Refund';
        nTask12.getDescribesubjectpiclist();
        nTask12.OnchangecancelRelated();
        
    TaskCreateController nTask1 = new TaskCreateController();
        nTask1.initmethod();
        nTask1.newtask=new Task();
        nTask1.accountId=(String)a.Id;
        nTask1.newtask.Query_Type__c='Document/Information Related';
        nTask1.getDescribesubjectpiclist();
        nTask1.onchange();
        nTask1.Isdocumentrelated=true;
        nTask1.Createtask(); 
        
        insert nTask1.newtask;   
        
    TaskCreateController nTask2 = new TaskCreateController();
        nTask2.initmethod();
        nTask2.newtask=new Task();
        nTask2.accountId=(String)a.Id;
        nTask2.newtask.Query_Type__c='Possession Related';
        nTask2.getDescribesubjectpiclist();
        nTask2.onchange();
        nTask2.Ispossessionrelated=true;
        nTask2.Createtask();
        
        insert nTask2.newtask;
    
    TaskCreateController nTask3 = new TaskCreateController();
        nTask3.initmethod();
        nTask3.newtask=new Task();
        nTask3.accountId=(String)a.Id;
        nTask3.newtask.Query_Type__c='Lead Related/Event Tracking';
        nTask3.getDescribesubjectpiclist();
        nTask3.onchange();
        nTask3.Isleadrelated=true;
        nTask3.Createtask();
        
        insert nTask3.newtask;
        
    TaskCreateController nTask5 = new TaskCreateController();
        nTask5.initmethod();
        nTask5.newtask=new Task();
        nTask5.accountId=(String)a.Id;
        nTask5.newtask.Query_Type__c='Customer IT Tools Related';
        nTask5.getDescribesubjectpiclist();
        nTask5.onchange();
        nTask5.Iscustomerrelated=true;
        nTask5.Createtask();
        
        insert nTask5.newtask;
        
    TaskCreateController nTask6 = new TaskCreateController();
        nTask6.initmethod();
        nTask6.newtask=new Task();
        nTask6.accountId=(String)a.Id;
        nTask6.newtask.Query_Type__c='Cancellation Related';
        nTask6.getDescribesubjectpiclist();
        nTask6.onchange();
        nTask6.Iscancellationrelated=true;
        nTask6.Createtask();
        
        insert nTask6.newtask;
    
    }
    
}